package pers.test.votemanage.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pers.test.votemanage.dao.OptionsMapper;
import pers.test.votemanage.domain.Options;
import pers.test.votemanage.domain.Question;
import pers.test.votemanage.service.OptionsService;

@Service
public class OptionsServiceImpl implements OptionsService {

    @Autowired
    private OptionsMapper optionsMapper;


    @Override
    public void insertOptions(Options options) {
        Options options1 = Options.builder().id(options.getId())
                .questionId(options.getQuestionId())
                .optionContent(options.getOptionContent())
                 .total(options.getTotal()).build();
        optionsMapper.insertOptions(options1);
    }


}
